package day06;

import java.io.*;

public class P08FileCopy2 {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        try {
            InputStream bis = new BufferedInputStream(new FileInputStream("huge.txt"));
            BufferedOutputStream bos = new BufferedOutputStream((new FileOutputStream("huge3.txt", true)));//追加模式

            int x;
            while ((x = bis.read()) != -1) {
                bos.write(x);
            }


            bis.close();
            bos.close();

        } catch (IOException e) {

        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);

    }
}
